package me.sdevil507.supports.shiro.token;

import me.sdevil507.supports.shiro.enums.LoginChannel;
import me.sdevil507.supports.shiro.enums.LoginModeType;

public class JWTToken extends BaseToken {
    private static final long serialVersionUID = 84324893028403921L;
    private String token;

    public JWTToken(String token, LoginChannel channel, LoginModeType model) {
        super(channel.name(), model.name());
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return this.token;
    }

    @Override
    public Object getCredentials() {
        return this.token;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
